package person;

import java.util.Vector;

/**
 * 
 * 
 * @author Minodor
 * 
 *         Enumeration for person/actor Sex;
 */
public enum Sex {
	FEMALE, MALE, SEX;
	public static Sex match(String s) {
		if (s.equalsIgnoreCase("male"))
			return MALE;
		if (s.equalsIgnoreCase("female"))
			return FEMALE;
		return SEX;
	}

	public static Vector<Sex> toList() {
		Vector<Sex> list = new Vector<Sex>();
		list.add(MALE);
		list.add(FEMALE);
		return list;
	}

	@Override
	public String toString() {
		switch (this) {
		case MALE:
			return "male";
		case FEMALE:
			return "female";
		default:
			return "sex";
		}
	}

}
